﻿using System;
using System.Web;
using System.Web.Optimization;

namespace CanDichVU
{
    public class BundleConfig
    {

        public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
        {
            if (ignoreList == null)
                throw new ArgumentNullException("ignoreList");
            ignoreList.Ignore("*.intellisense.js");
            ignoreList.Ignore("*-vsdoc.js");
            ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
            //ignoreList.Ignore("*.min.js", OptimizationMode.WhenDisabled);
            //ignoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);
        }

        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {

            bundles.IgnoreList.Clear();
            AddDefaultIgnorePatterns(bundles.IgnoreList);


            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                        "~/Scripts/jquery-ui-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.unobtrusive*"
                        //"~/Scripts/jquery.validate*"
                       ));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            bundles.Add(new ScriptBundle("~/bundles/PluginJs").Include(
                        "~/Scripts/JSMakeDialog.js", "~/ckeditor/ckeditor.js", "~/Scripts/Plugin/dnews/dnews.js", "~/Scripts/jquery.tooltip.js", "~/Scripts/Plugin/Easy_Tabs/js/easyResponsiveTabs.js", "~/Scripts/jquery.simpletip-1.3.1.js", "~/Scripts/jquery.scrollTo-1.4.0-min.js", "~/Scripts/show_more.js", "~/Scripts/Main.js", "~/Scripts/Function.Cdv.js"));

            bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css", "~/Scripts/Plugin/dnews/dnews.css", "~/Scripts/Plugin/Easy_Tabs/css/easy-responsive-tabs.css"));

            bundles.Add(new ScriptBundle("~/bundles/framework").Include(
                       "~/Scripts/jquery.json.js", "~/Scripts/kendo-ui/js/kendo.all.min.js"
                       , "~/Scripts/kendo-ui/js/cultures/kendo.culture.vi-VN.min.js"
                       , "~/Scripts/jquery-explr-1.4.js", "~/Scripts/jquery-easyui/jquery.easyui.min.js"
                       , "~/Scripts/jquery.cookie.js", "~/Scripts/jquery.ui.position"
                        //, "~/Scripts/jquery.contextMenu.js"
                       , "~/Scripts/ContextMenu/kendo.contextmenu.js"
                       , "~/Scripts/jquery-loadmask/jquery.loadmask.js"
                        , "~/Scripts/Cofirm/jquery.confirm.min.js"
                         , "~/Scripts/Cofirm/bootstrap.min.js"
                        , "~/Scripts/fileuploader.js"
                       , "~/Scripts/Admin.js"));

            bundles.Add(new StyleBundle("~/Content/Addcss").Include("~/Content/Admin.css", "~/Scripts/kendo-ui/styles/kendo.common.min.css", "~/Scripts/kendo-ui/styles/kendo.uniform.css", "~/Scripts/kendo-ui/styles/kendo.dataviz.min.css", "~/Content/site.css", "~/Content/jquery-explr-1.4.min.css"
                , "~/Scripts/jquery-easyui/themes/metro/easyui.css"
                //, "~/Content/jquery.contextMenu.css"
                , "~/Scripts/ContextMenu/kendo.contextmenu.css"
                , "~/Scripts/jquery-loadmask/jquery.loadmask.css"
                , "~/Scripts/Cofirm/bootstrap.min.css"
                , "~/Content/fileuploader.css"
                ));

            bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
                        "~/Content/themes/base/jquery-ui.css",
                        //"~/Content/themes/base/jquery.ui.core.css",
                        //"~/Content/themes/base/jquery.ui.resizable.css",
                        //"~/Content/themes/base/jquery.ui.selectable.css",
                        //"~/Content/themes/base/jquery.ui.accordion.css",
                        //"~/Content/themes/base/jquery.ui.autocomplete.css",
                        //"~/Content/themes/base/jquery.ui.button.css",
                        //"~/Content/themes/base/jquery.ui.dialog.css",
                        //"~/Content/themes/base/jquery.ui.slider.css",
                        //"~/Content/themes/base/jquery.ui.tabs.css",
                        //"~/Content/themes/base/jquery.ui.datepicker.css",
                        //"~/Content/themes/base/jquery.ui.progressbar.css",
                        "~/Content/themes/base/jquery.ui.theme.css"));
        }
    }
}